<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="text" indent="no"/>
    <xsl:template match="/">
        <xsl:for-each select="config/resources/resource">
            <xsl:sort select="@name"/>
            <xsl:variable name="pathId" select="../@path" />
            <xsl:value-of select="@name"/>
            <xsl:text>,</xsl:text>
            <xsl:value-of select="$pathId" />
            <xsl:text>,</xsl:text>
            <xsl:value-of select="../../paths/path[@name=$pathId]/@src" />
            <xsl:value-of select="@src"/>
            <xsl:text>,</xsl:text>
            <xsl:value-of select="@src"/>
            <xsl:text>,</xsl:text>
            <xsl:value-of select="@length"/>
            <xsl:text>&#xa;</xsl:text>
        </xsl:for-each>
    </xsl:template>
</xsl:stylesheet>


